<%@ page contentType="text/html; charset=UTF-8" %>
<% request.setCharacterEncoding("UTF-8"); 
	String userId=(String)session.getAttribute("userId");
    // session 시간 변경
    //session.setMaxInactiveInterval(20*60);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<script type="text/javascript">
function sendIt(){
	var f = document.myForm;
	if(!f.userId.value){
		alert("아이디를 입력하세요");
		f.userId.focus();
		return;
	}
	
	if(!f.userPwd.value){
		alert("패스워드를 입력하세요");
		f.userPwd.focus();
		return;
	}
	
	f.submit();
}
</script>
</head>
<body style="font-size:9pt;">
<table border="1" width="300" align="center" style="font-size:9pt;">
    <tr height="20">
        <td colspan="2" align="right">
            |게시판|
            <%if(userId==null){ %>
            일정관리
            <%}else{ %>
            <a href="test2.jsp">일정관리</a>
            <%} %>
        </td>
    </tr>
    <tr height="400px">
        <td width="100px" valign="top">
            <%if(userId==null){ %>
            <form action="test1_ok.jsp" name="myForm" method="get">
                아이디 : <input type="text" name="userId" size="10"/><br/>
                패스워드 : <input type="password" name="userPwd" size="10"/><br/>
                <input type="button" value="로그인" onClick="sendIt();"/>
            </form>
            <%}else{%>
            <%=userId %>님 방가방가<br/>
            <a href="logout.jsp">로그아웃</a>
            <% }%>
        </td>
        <td></td>
    </tr>
</table>
</body>
</html>